Optimal. Leaf size=98 \[ \frac {x}{a^2 c^3}+\frac {\cot ^5(e+f x) (1+\sec (e+f x))}{5 a^2 c^3 f}-\frac {\cot ^3(e+f x) (5+4 \sec (e+f x))}{15 a^2 c^3 f}+\frac {\cot (e+f x) (15+8 \sec (e+f x))}{15 a^2 c^3 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 98, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 3, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {3989, 3967, 8}
\begin {gather*} \frac {\cot ^5(e+f x) (\sec (e+f x)+1)}{5 a^2 c^3 f}-\frac {\cot ^3(e+f x) (4 \sec (e+f x)+5)}{15 a^2 c^3 f}+\frac {\cot (e+f x) (8 \sec (e+f x)+15)}{15 a^2 c^3 f}+\frac {x}{a^2 c^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3967
Rule 3989
Rubi steps
\begin {align*} \int \frac {1}{(a+a \sec (e+f x))^2 (c-c \sec (e+f x))^3} \, dx &=-\frac {\int \cot ^6(e+f x) (a+a \sec (e+f x)) \, dx}{a^3 c^3}\\ &=\frac {\cot ^5(e+f x) (1+\sec (e+f x))}{5 a^2 c^3 f}-\frac {\int \cot ^4(e+f x) (-5 a-4 a \sec (e+f x)) \, dx}{5 a^3 c^3}\\ &=\frac {\cot ^5(e+f x) (1+\sec (e+f x))}{5 a^2 c^3 f}-\frac {\cot ^3(e+f x) (5+4 \sec (e+f x))}{15 a^2 c^3 f}-\frac {\int \cot ^2(e+f x) (15 a+8 a \sec (e+f x)) \, dx}{15 a^3 c^3}\\ &=\frac {\cot ^5(e+f x) (1+\sec (e+f x))}{5 a^2 c^3 f}-\frac {\cot ^3(e+f x) (5+4 \sec (e+f x))}{15 a^2 c^3 f}+\frac {\cot (e+f x) (15+8 \sec (e+f x))}{15 a^2 c^3 f}-\frac {\int -15 a \, dx}{15 a^3 c^3}\\ &=\frac {x}{a^2 c^3}+\frac {\cot ^5(e+f x) (1+\sec (e+f x))}{5 a^2 c^3 f}-\frac {\cot ^3(e+f x) (5+4 \sec (e+f x))}{15 a^2 c^3 f}+\frac {\cot (e+f x) (15+8 \sec (e+f x))}{15 a^2 c^3 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(257\) vs. \(2(98)=196\).
time = 1.35, size = 257, normalized size = 2.62 \begin {gather*} \frac {\csc \left (\frac {e}{2}\right ) \csc ^5\left (\frac {1}{2} (e+f x)\right ) \sec \left (\frac {e}{2}\right ) \sec ^3\left (\frac {1}{2} (e+f x)\right ) (360 f x \cos (f x)-360 f x \cos (2 e+f x)-120 f x \cos (e+2 f x)+120 f x \cos (3 e+2 f x)-120 f x \cos (2 e+3 f x)+120 f x \cos (4 e+3 f x)+60 f x \cos (3 e+4 f x)-60 f x \cos (5 e+4 f x)+200 \sin (e)-584 \sin (f x)-534 \sin (e+f x)+178 \sin (2 (e+f x))+178 \sin (3 (e+f x))-89 \sin (4 (e+f x))-520 \sin (2 e+f x)+248 \sin (e+2 f x)+120 \sin (3 e+2 f x)+248 \sin (2 e+3 f x)+120 \sin (4 e+3 f x)-184 \sin (3 e+4 f x))}{30720 a^2 c^3 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.13, size = 88, normalized size = 0.90
method | result | size |
derivativedivides | \(\frac {\frac {\left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3}-6 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+32 \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\frac {1}{5 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}-\frac {2}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}+\frac {16}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )}}{16 f \,c^{3} a^{2}}\) | \(88\) |
default | \(\frac {\frac {\left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3}-6 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+32 \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\frac {1}{5 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}-\frac {2}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}+\frac {16}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )}}{16 f \,c^{3} a^{2}}\) | \(88\) |
risch | \(\frac {x}{a^{2} c^{3}}+\frac {2 i \left (15 \,{\mathrm e}^{7 i \left (f x +e \right )}+15 \,{\mathrm e}^{6 i \left (f x +e \right )}-65 \,{\mathrm e}^{5 i \left (f x +e \right )}+25 \,{\mathrm e}^{4 i \left (f x +e \right )}+73 \,{\mathrm e}^{3 i \left (f x +e \right )}-31 \,{\mathrm e}^{2 i \left (f x +e \right )}-31 \,{\mathrm e}^{i \left (f x +e \right )}+23\right )}{15 f \,c^{3} a^{2} \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )^{5} \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{3}}\) | \(127\) |
norman | \(\frac {\frac {\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )}{a c f}+\frac {x \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{c a}+\frac {1}{80 a c f}-\frac {\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )}{8 a c f}-\frac {3 \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8 a c f}+\frac {\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )}{48 a c f}}{a \,c^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}\) | \(137\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.52, size = 159, normalized size = 1.62 \begin {gather*} -\frac {\frac {5 \, {\left (\frac {18 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}\right )}}{a^{2} c^{3}} - \frac {480 \, \arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a^{2} c^{3}} + \frac {3 \, {\left (\frac {10 \, \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {80 \, \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} - 1\right )} {\left (\cos \left (f x + e\right ) + 1\right )}^{5}}{a^{2} c^{3} \sin \left (f x + e\right )^{5}}}{240 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.03, size = 166, normalized size = 1.69 \begin {gather*} \frac {23 \, \cos \left (f x + e\right )^{4} - 8 \, \cos \left (f x + e\right )^{3} - 27 \, \cos \left (f x + e\right )^{2} + 15 \, {\left (f x \cos \left (f x + e\right )^{3} - f x \cos \left (f x + e\right )^{2} - f x \cos \left (f x + e\right ) + f x\right )} \sin \left (f x + e\right ) + 7 \, \cos \left (f x + e\right ) + 8}{15 \, {\left (a^{2} c^{3} f \cos \left (f x + e\right )^{3} - a^{2} c^{3} f \cos \left (f x + e\right )^{2} - a^{2} c^{3} f \cos \left (f x + e\right ) + a^{2} c^{3} f\right )} \sin \left (f x + e\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {\int \frac {1}{\sec ^{5}{\left (e + f x \right )} - \sec ^{4}{\left (e + f x \right )} - 2 \sec ^{3}{\left (e + f x \right )} + 2 \sec ^{2}{\left (e + f x \right )} + \sec {\left (e + f x \right )} - 1}\, dx}{a^{2} c^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.50, size = 110, normalized size = 1.12 \begin {gather*} \frac {\frac {240 \, {\left (f x + e\right )}}{a^{2} c^{3}} + \frac {3 \, {\left (80 \, \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 10 \, \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1\right )}}{a^{2} c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5}} + \frac {5 \, {\left (a^{4} c^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 18 \, a^{4} c^{6} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{a^{6} c^{9}}}{240 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.54, size = 161, normalized size = 1.64 \begin {gather*} \frac {3\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+5\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8-90\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+240\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4-30\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+240\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5\,\left (e+f\,x\right )}{240\,a^2\,c^3\,f\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________